/* Customization code for component BCreditor */
&scoped-define class-version 74.0
{ definition/bcreditor.i }
{us/bbi/mfdeclre.i}


   define variable v_businessrelationcode as character no-undo.
    
  
   
   on write of vd_mstr do:
   
    assign vd_data_complete = true
           vd_fix_pr = no
           vd_site = "RG01"
           vd_daybookset = "AP".
   
     
   end. /* on write of creditor do: */

/*
     on write of ad_mstr do:
     
    
     find businessrelation where ad_mstr.ad_bus_relation =  businessrelation.businessrelationcode no-error.
                         
    if available  businessrelation then     
     assign ad_name = businessrelation.businessrelationname1.
      
    end.
   */
 /*
PROCEDURE BCreditor.InitialValues.after:
    define buffer b_tCreditor for tCreditor.
    define variable lvi_msg_nbr   as  integer    no-undo. 
    define variable vcMfgDomain1  as  character  no-undo.
    define variable viReturn      as  INTEGER    NO-UNDO.
    
    run getpublicdata(input "vcMfgDomain", output vcMfgDomain1 , output vireturn).
    
    for first b_tCreditor no-lock.
    
    for each code_mstr where code_domain = vcMfgDomain1
                         and code_fldname = "xxdefprofile"
                         no-lock .
    
           if code_value = "ap_InvControlGLProfileCode"  then                   
                assign b_tCreditor.tcInvControlGLProfileCode    = code_cmmt.
           if code_value = "ap_CnControlGLProfileCode"  then  
                assign b_tCreditor.tcCnControlGLProfileCode     = code_cmmt.
           if code_value = "ap_PrepayControlGLProfileCode"  then      
                assign b_tCreditor.tcPrepayControlGLProfileCode = code_cmmt.
                
    end. /* for each code_mstr */
    
    end. /* for first b_tCreditor no-lock. */
    END PROCEDURE.
    
/** Do 2.3.2 cim-load after create supplier **/
    



PROCEDURE BCreditor.ExitInstance.before:
   define buffer b_admstr for ad_mstr.
   define buffer b_creditor for t_oCreditor.
  for each b_creditor ,
      each businessrelation of b_creditor no-lock.
      put b_creditor.creditorcode skip.
      put unformatted businessrelation.businessrelationname1 skip.
      v_businessrelationcode = businessrelation.businessrelationname1.
      
      find b_admstr where b_admstr.ad_bus_relation = businessrelation.businessrelationcode no-lock no-error.
      if available b_admstr then
       do:
      b_admstr.ad_name = businessrelation.businessrelationname1 .
      put unformatted b_admstr.ad_addr skip.
      end.
      
   end.

END.
*/
/*
Procedure: ApiDefaultCostCentreBaseOnProfileCode
Description:
The method will use the specific GLProfileID, GLProfileCode or Supplier code as the input parameters to find the corresponding Cost Center code value.
Parameters:
input igControlGLProfileId
    (specific Profile Id)
input icControlGLProfileCode
    (specific Profile Code)
input icCreditorCode
    (specific Supplier Code)
output ocCostCentreCode
    (returns the Cost Center Code value found)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiDefaultCostCentreBaseOnProfileCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiDefaultCostCentreBaseOnProfileCode.after:

END PROCEDURE.
**/

/*
Procedure: ApiDefaultDivCodeBasedOnProfileCode
Description:
The method will use the specific ProfileID, ProfileCode or Supplier code as the input parameters to find the corresponding Division code value.
Parameters:
input igDivisionProfileId
    (specific Sub-Account Profile ID)
input icDivisionProfileCode
    (specific Sub-Account Profile Code)
input icCreditorCode
    (specific Supplier Code)
output ocDivisionCode
    (returns Sub-Account Code value found)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiDefaultDivCodeBasedOnProfileCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiDefaultDivCodeBasedOnProfileCode.after:

END PROCEDURE.
**/

/*
Procedure: ApiDefaultProjectBaseOnProfileCode
Description:
The method will use the specific GLProfileID, GLProfileCode or Supplier Code as the input parameters to find the corresponding Project code value.
Parameters:
input igControlGLProfileId
    (specific Profile Id)
input icControlGLProfileCode
    (specific Profile Code)
input icCreditorCode
    (specific Supplier Code)
output ocProjectCode
    (returns the Project Code value found)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiDefaultProjectBaseOnProfileCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiDefaultProjectBaseOnProfileCode.after:

END PROCEDURE.
**/

/*
Procedure: ApiDumpCreditorInXml
Description:
This method will load the Suppliers for which the IDs were passed in the input parameter.
These suppliers will be dumped in the XML file that was passed in the input parameter.
Parameters:
input igCreditorID
    (List of Supplier IDs)
input icFileName
    (Dump File)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiDumpCreditorInXml.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiDumpCreditorInXml.after:

END PROCEDURE.
**/

/*
Procedure: ApiGetCInvoiceActivity
Description:
The method will call the GetCreditorCInvoice and GetCInvoicePayment methods to retrieve the data for Supplier activity.

In case you find a invoice in tCreditorInv which is of type prepayment, you can take the tdOriginalAmountTC of the invoice to get the prepayment amount
For all other invoice, go through the tCreditorPay table and for each record find the Invoice (using tCInvoicePay.tcCInvoiceNumber) and verify it the type is prepayment.
If the type is prepayment, the prepayment amount = dCDocumentInvoiceXrefAlloTC - tdCDocumentInvoiceXrefDiscTC
Parameters:
input icCompanyListID
    (Selected company id list)
input icCreditorCode
    (Supplier Code)
input igCreditorID
    (Supplier ID)
input itCInvoiceEndDate
    (Invoice date to)
input itCInvoiceStartDate
    (Invoice date from)
output dataset tCreditorInv
    (Temporary table with all matching lines of Invoice table)
input ilCInvoiceIsOpen
    (Flag of invoice is open)
output dataset tCInvoicePay
    (Temporary table with all matching lines of Document and movement table)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiGetCInvoiceActivity.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiGetCInvoiceActivity.after:

END PROCEDURE.
**/

/*
Procedure: ApiGetPurchaseAccountData
Description:
The method will use the Supplier Code as the input parameter to call the BBankEntry.GetDefaultCCProjDivForControlGL method to retrieve the default GL Division and Cost Center Code.
Parameters:
input icCreditorCode
    (Supplier Code)
output ocPurchaseGLCode
    (returns GL Code value found)
output ocPurchaseDivisionCode
    (returns Division Code value found)
output ocPurchaseCostCentreCode
    (returns Cost Center Code value found)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiGetPurchaseAccountData.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiGetPurchaseAccountData.after:

END PROCEDURE.
**/

/*
Procedure: ApiLoadCreditor
Description:
This method will first get all the Suppliers belonging to the current entity. Then it will call some functions ApiLoadCreditorCalcXXX to use the id fields for the Suppliers to retrieve the relative code values such as Supplier Type Code, Purchase Type Code, and so on. The data are populated into two temp-tables as output.
Parameters:
output dataset tApiCreditor
    (Temporary table with Supplier information)
output dataset tApiCreditorSafDefault
    (Temporary table with Saf information)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiLoadCreditor.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiLoadCreditor.after:

END PROCEDURE.
**/

/*
Procedure: ApiLoadCreditorByFilter
Description:
This method will first get all the Suppliers belonging to the current entity. Then it will call some functions ApiLoadCreditorCalcXXX to use the id fields for the Suppliers to retrieve the relative code values such as Supplier Type Code, Purchase Type Code, and so on. The data are populated into two temp-tables as output. NEW METHOD: add table tApiCreditorVat as output table, this is necessary for backwards compatibility
Parameters:
input dataset tqSelectCreditorQry
    ()
output dataset tApiCreditor
    (Temporary table with Supplier information)
output dataset tApiCreditorSafDefault
    (Temporary table with Saf information)
output dataset tApiCreditorVat
    (Temporary table with WHT information)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiLoadCreditorByFilter.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiLoadCreditorByFilter.after:

END PROCEDURE.
**/

/*
Procedure: ApiLoadCreditorV01
Description:
This method will first get all the Suppliers belonging to the current entity. Then it will call some functions ApiLoadCreditorCalcXXX to use the id fields for the Suppliers to retrieve the relative code values such as Supplier Type Code, Purchase Type Code, and so on. The data are populated into two temp-tables as output. NEW METHOD: add table tApiCreditorVat as output table, this is necessary for backwards compatibility
Parameters:
output dataset tApiCreditor
    (Temporary table with Supplier information)
output dataset tApiCreditorSafDefault
    (Temporary table with Saf information)
output dataset tApiCreditorVat
    (Temporary table with WHT information)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiLoadCreditorV01.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiLoadCreditorV01.after:

END PROCEDURE.
**/

/*
Procedure: ApiReplicateFromDaemon
Description:
This method will replicate the Supplier records to the operational tables (Account (vd_mstr)).

All existing Suppliers, based on the ID-List that was passed as input parameter will be loaded into the instance.
All the loaded Suppliers will be replicated to operational tables for the current domain.
If for any reason the Supplier record already exist, the Supplier record will be overridden.
Parameters:
input icListIDs
    (Char(4) seperated list of IDs of records that need to be duplicated in MFG/Pro)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiReplicateFromDaemon.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiReplicateFromDaemon.after:

END PROCEDURE.
**/

/*
Procedure: ApiStdMaintainTT
Description:
This method can create new instances or update existing instances based on the content of the input temp-table.
The action that is passed as a parameter will define if the records are saved, saved as draft or just validated.

If the supplier can be found (based on its code), the existing supplier is updated.
If not, a new supplier is created.
Parameters:
input dataset tApiCreditor
    (Temp-table like Creditor with the records that need to be created or modified.)
input dataset tApiCreditorSafDefault
    (Temp-table like CreditorSafDefault with the records that need to be created or modified.)
input icAction
    (This input parameter defines what should happen with the input data:
- SAVE: Save the data if there were no errors.
- SAVESTORE: Save the data if there were no errors.  If there were, save as draft.
- STORE: Save the data as draft.
- VALIDATE: Validate the input data, but do not save the data.)
output ocLstPrimKey
    (Returns the list of IDs for all records that were processed.)
output ocLstReturn
    (Returns the list of returnvalues for all records that were processed.)
output ocLstRowid
    (Returns the list of Rowids for each records that was processed.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiStdMaintainTT.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiStdMaintainTT.after:

END PROCEDURE.
**/

/*
Procedure: ApiStdMaintainTTDetailV01
Description:
This method is a sub-method of ApiStdMaintainTTV01. : NEW METHOD: add table tCreditorVat, this is necessary for backwards compatibility
Parameters:
input icAction
    ()
input-output bcLstPrimKey
    ()
input-output bcLstReturn
    ()
input-output bcLstRowid
    ()
input-output blSaveAsDraft
    (SaveAsDraft)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiStdMaintainTTDetailV01.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiStdMaintainTTDetailV01.after:

END PROCEDURE.
**/

/*
Procedure: ApiStdMaintainTTV01
Description:
This method can create new instances or update existing instances based on the content of the input temp-table.
The action that is passed as a parameter will define if the records are saved, saved as draft or just validated.

If the supplier can be found (based on its code), the existing supplier is updated.
If not, a new supplier is created.

NEW METHOD: add table tCreditorVat as input table, this is necessary for backwards compatibility
Parameters:
input dataset tApiCreditor
    (Temp-table like Creditor with the records that need to be created or modified.)
input dataset tApiCreditorSafDefault
    (Temp-table like CreditorSafDefault with the records that need to be created or modified.)
input dataset tApiCreditorVat
    (Temp-table like CreditorVat with the records that need to be created or modified.)
input icAction
    (This input parameter defines what should happen with the input data:
- SAVE: Save the data if there were no errors.
- SAVESTORE: Save the data if there were no errors.  If there were, save as draft.
- STORE: Save the data as draft.
- VALIDATE: Validate the input data, but do not save the data.)
output ocLstPrimKey
    (Returns the list of IDs for all records that were processed.)
output ocLstReturn
    (Returns the list of returnvalues for all records that were processed.)
output ocLstRowid
    (Returns the list of Rowids for each records that was processed.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiStdMaintainTTV01.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiStdMaintainTTV01.after:

END PROCEDURE.
**/

/*
Procedure: CalculateBalanceOI
Description:
This method will use the Supplier Id, Supplier Code and Currency Code as input parameters to calculate the balance value of the open invoices for the specific Supplier.
Parameters:
input igCreditorId
    (Supplier Id)
input icCreditorCode
    (Supplier Code)
input icCurrencyCode
    (Currency Code)
output odBalance
    (returns calculated balance value for open invoices)
input icCompanyListID
    (Not used in this method)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.CalculateBalanceOI.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.CalculateBalanceOI.after:

END PROCEDURE.
**/

/*
Procedure: CalculateBOIforCompanies
Description:
This method will use the Supplier Id, Supplier Code, Currency Code and Company Code List as input parameters to calculate the balance value of the open invoices for the specific Supplier in the selected companies.
Parameters:
input igCreditorId
    (Supplier Id)
input icCreditorCode
    (Supplier Code)
input icCurrencyCode
    (Currency Code)
output odBalance
    (returns calculated balance value for open invoices)
input icCompanyListID
    (Selected company id list)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.CalculateBOIforCompanies.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.CalculateBOIforCompanies.after:

END PROCEDURE.
**/

/*
Procedure: CloseExternalInstances
Description:
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.CloseExternalInstances.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.CloseExternalInstances.after:

END PROCEDURE.
**/

/*
Procedure: CreateBankNumberPayCode
Description:
This method will retrieve all the default Payment Format information with the 'Invoice' and 'Payment' levels.
Parameters:
input icPayFormatTypeCode
    (Payment Format Type Code)
output dataset tCBankNumberPayCodeRef
    (Temporary table with Payment Format information)
input icParentRowID
    (Rowid of the "New" Customer/Supplier Bank.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.CreateBankNumberPayCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.CreateBankNumberPayCode.after:

END PROCEDURE.
**/

/*
Procedure: DefaultValuesBusinessRelation
Description:
This method will retrieve the default tax information for the specific supplier.
Parameters:
input icRowId
    (Rowid of the Supplier.)
input icBusinessRelationCode
    (Business Relation Code for the Supplier.)
input ilStartedFromCalculate
    (Determine whether the method is called by the method BCreditor.Calculate.)
output olCreditorIsTaxable
    (returns Supplier Is Taxable)
output olCreditorIsTaxInCity
    (returns Supplier Is Tax In City)
output olCreditorIsTaxIncluded
    (returns Supplier Is Tax Included)
output dataset tAddressRefCreditor
    (Temporary table with Supplier Business Relation information)
output ocCreditorTaxZone
    (returns Supplier Tax Zone)
output ocCreditorTaxIDFederal
    (returns Supplier Tax ID Federal)
output ocCreditorTaxIDState
    (returns Supplier Tax ID State)
output ocCreditorTaxUsage
    (returns Supplier Tax Usage)
output ocCreditorTaxClass
    (returns Supplier Tax Class)
output ocCreditorTaxIDMisc1
    (returns Supplier Tax ID Misc1)
output ocCreditorTaxIDMisc2
    (returns Supplier Tax ID Misc2)
output ocCreditorTaxIDMisc3
    (returns Supplier Tax ID Misc3)
output oiReturnStatus
    (Return status of the method.)
*/
/*
PROCEDURE BCreditor.DefaultValuesBusinessRelation.before:
END PROCEDURE.


PROCEDURE BCreditor.DefaultValuesBusinessRelation.after:
END PROCEDURE.
*/

/*
Procedure: GetAutoNumber
Description:
This method will retrieve an automatic number for the creditor (if an active automatic number record was created for creditor - sharedset combination)
Parameters:
input icRowid
    (Rowid of the Creditor you want to automatically fill the Creditorcode for.)
output ocCreditorCode
    (Automatically generated CreditorCode)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetAutoNumber.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetAutoNumber.after:

END PROCEDURE.
**/

/*
Procedure: GetBalanceLCAmount
Description:
The method will calculate the base currency balance value for all the invoices belonging to the specific supplier.
Parameters:
input igCreditor_ID
    (Supplier Id)
input icCurrencyCode
    (Currency Code)
output odCInvoiceBalanceLC
    (returns the base currency balance value for the invoices belonging to the supplier.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetBalanceLCAmount.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetBalanceLCAmount.after:

END PROCEDURE.
**/

/*
Procedure: GetBalanceLCAmountForComp
Description:
This method is similar with GetBalanceLCAmount method except the input parameter iicompanyid. It seems that this method is written long before and not used for now.
Parameters:
input igCreditor_ID
    (Supplier Id)
input icCurrencyCode
    (Currency Code)
input igCompanyID
    (Company Id)
output odCInvoiceBalanceLC
    (returns the base currency balance value for the invoices belonging to the supplier for the specific company.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetBalanceLCAmountForComp.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetBalanceLCAmountForComp.after:

END PROCEDURE.
**/

/*
Procedure: GetBankEntryAndAdjustmentId
Description:
This method will get Bank Entry ID / Open Adjustment ID from input posting id and journal type.
Parameters:
input icJournalTypeCode
    (Daybook Type Code)
input igPostingId
    (Posting Id)
output ogBankEntryId
    (returns Bank Entry ID)
output ogAdjustmentId
    (returns Open Adjustment ID)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetBankEntryAndAdjustmentId.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetBankEntryAndAdjustmentId.after:

END PROCEDURE.
**/

/*
Procedure: GetCInvoicePayment
Description:
This method is used to retrieve the data for the 'Payments' tab of Supplier Activity Dashboard.
The main logic will execute three queries.
The first query is used to get all the supplier payments created via the Payments menus.
The second query is used to get all the movements created outside the Payment menus.
The third query is used to get the prepayments records created in Banking Entry. It will only be executed when the status filter is not 'Closed'. And if the prepayment has been linked to a payment, it will also not be populated to the result temp-table.
Parameters:
input icCompanyListID
    (ID List of the entities)
input igCreditorID
    (Supplier Id)
input icCreditorCode
    (Supplier Code)
input itCInvoiceEndDate
    (end date filter)
input itCInvoiceStartDate
    (start date filter)
input icCInvoiceMovementType
    (Supplier Movement Type)
input ilDocumentIsOpen
    (Status of Supplier Payment)
output dataset tCInvoicePay
    (result temp-table of all the retrieved data)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetCInvoicePayment.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetCInvoicePayment.after:

END PROCEDURE.
**/

/*
Procedure: GetCompanyList
Description:
The method will retrieve the company codes from the Supplier ShareSet ID.
Parameters:
input igCreditShareSet_ID
    (Supplier ShareSet Id)
output ocCompanyCode
    (returns the string of company codes.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetCompanyList.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetCompanyList.after:

END PROCEDURE.
**/

/*
Procedure: GetCreditorInvoice
Description:
The method will get the Supplier Invoices within a certain period for the specific Companies and Suppliers.
Parameters:
input icCompanyListID
    (ID List of the companies)
input igCreditorID
    (Supplier Id)
input icCreditorCode
    (Supplier Code)
input itCInvoiceEndDate
    (Supplier Invoice End Date)
input itCInvoiceStartDate
    (Supplier Invoice Start Date)
output dataset tCreditorInv
    (Temporary table with all matching lines of Invoice table)
input ilCInvoiceIsOpen
    (Supplier Invoice Is Open)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetCreditorInvoice.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetCreditorInvoice.after:

END PROCEDURE.
**/

/*
Procedure: PostValidateComponent
Description:
Validations that are done after the ancestor code of ValidateComponent.
- Check if the business relation of this creditor should be systemwide or belong to this domain.
- verify that shared set for creditor can not be used in several domains when business relation is domain specific.
- run ValBankNumberAndPayCodeRef.
- run ValXX methods to do validation for new and changed suppliers.
- validate the saf information.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.PostValidateComponent.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.PostValidateComponent.after:

END PROCEDURE.
**/

/*
Procedure: PreValidateComponent
Description:
Validations that are done before the ancestor code of ValidateComponent.
Automatic numbering for the Supplier.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.PreValidateComponent.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.PreValidateComponent.after:

END PROCEDURE.
**/

/*
Procedure: ValBankNumberAndPayCodeRef
Description:
Validates BankNumberRef table
- Validate Own Bank Number
- Validate that AR payment format is not allowed
- Validate Payment Format Code
- Determine supplier's bank's country (converting business relation code to ID
- Determine supplier's country if supplier's bank does not have a country
- Determine company's country if own bank does not have a country
- Determine own bank's country
- Run ValBankNumberPayCodeRef
- Validate that only one bank number can be set as default
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValBankNumberAndPayCodeRef.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValBankNumberAndPayCodeRef.after:

END PROCEDURE.
**/

/*
Procedure: ValBLWIGroup
Description:
Validates BLWI Group field.
- BLWIGroup must exist
- BLWIGroup must be active
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValBLWIGroup.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValBLWIGroup.after:

END PROCEDURE.
**/

/*
Procedure: ValBusinessRelation
Description:
Validates the Business Relation of the Creditor.
- BusinessRelation must be active
- check if business relation is valid if set tax report to yes
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValBusinessRelation.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValBusinessRelation.after:

END PROCEDURE.
**/

/*
Procedure: ValCnControlGLProfile
Description:
Validates Creditor Control Account for Credit Notes.
- Profile must exist
- Profile Type must be supplier control account
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValCnControlGLProfile.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValCnControlGLProfile.after:

END PROCEDURE.
**/

/*
Procedure: ValCreditorIsSendRemittance
Description:
Validates CreditorIsSendRemittance flag.
- run GetAddressWithType to get the Address of the type REMITTANCE. Validate that the EMail must be defined.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValCreditorIsSendRemittance.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValCreditorIsSendRemittance.after:

END PROCEDURE.
**/

/*
Procedure: ValCurrency
Description:
Validates Default Currency of Creditor.
- Currency must be active.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValCurrency.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValCurrency.after:

END PROCEDURE.
**/

/*
Procedure: ValDivisionProfile
Description:
Validates Division Profile.
- the Profile Type of the Supplier must be Sub-Account
- Profile must be active
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValDivisionProfile.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValDivisionProfile.after:

END PROCEDURE.
**/

/*
Procedure: ValFederalTax
Description:
This method validates Federal Tax IDs. This validation includes
- Validates if the Tax Report flag is checked the Federal Tax must be entered.
- Validates that same Federal Tax ID is not used more than once for Tax Reporting Credit.
- Ensures Federal Tax ID is not referenced against the related Business Relation.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValFederalTax.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValFederalTax.after:

END PROCEDURE.
**/

/*
Procedure: ValInvControlGLProfile
Description:
Validates Supplier Control Account for Invoices.
- the Profile Type must be Supplier Account
- Profile must be active
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValInvControlGLProfile.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValInvControlGLProfile.after:

END PROCEDURE.
**/

/*
Procedure: ValIsIntercoFlag
Description:
Validates InterCompany Flag
- validate that Interco flag of BR has to be the same as interco flag of GL where GLCode = PurchaseGLProfileCode
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValIsIntercoFlag.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValIsIntercoFlag.after:

END PROCEDURE.
**/

/*
Procedure: ValNormalPaymentCondition
Description:
Validates Normal Payment Condition field.
- validate that the normal credit terms code must be 'Nomal' or 'Staged'
- validate that the normal credit terms code  must be active
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValNormalPaymentCondition.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValNormalPaymentCondition.after:

END PROCEDURE.
**/

/*
Procedure: ValPrePayControlGLProfile
Description:
Validates Prepayment Control Account.
- the Profile Type must be Supplier Account
- Profile must be active
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValPrePayControlGLProfile.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValPrePayControlGLProfile.after:

END PROCEDURE.
**/

/*
Procedure: ValPurchaseGLProfileCode
Description:
Validates Purchase Account.
- the Profile Type must be Purchase Account
- Profile must be active
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValPurchaseGLProfileCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValPurchaseGLProfileCode.after:

END PROCEDURE.
**/

/*
Procedure: ValReasonCode
Description:
Validates Invoice Status Code.
- the invoice status code must be active
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValReasonCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValReasonCode.after:

END PROCEDURE.
**/

/*
Procedure: ValStateTax
Description:
Validates State Tax IDs. This validation includes:
- Checks if the country is in the EU. If yes, run BCountry.ApiCheckVatNumber to validate it with country tax format.
- Validates that the tax ID entered is in the correct format.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValStateTax.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValStateTax.after:

END PROCEDURE.
**/

/*
Procedure: ValTaxIDFiscalCode
Description:
Validates format of tax id fiscal code
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValTaxIDFiscalCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValTaxIDFiscalCode.after:

END PROCEDURE.
**/

/*
Procedure: GetPublicdActivitySales
Description:
read table
Parameters:
output dataset dActivitySales
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublicdActivitySales.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublicdActivitySales.after:

END PROCEDURE.
**/

/*
Procedure: SetPublicdActivitySales
Description:
write table
Parameters:
input dataset d_sActivitySales
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublicdActivitySales.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublicdActivitySales.after:

END PROCEDURE.
**/

/*
Procedure: GetPublictAddressRefCreditor
Description:
read table
Parameters:
output dataset tAddressRefCreditor
    (like tqAddressByAddressType)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublictAddressRefCreditor.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublictAddressRefCreditor.after:

END PROCEDURE.
**/

/*
Procedure: SetPublictAddressRefCreditor
Description:
write table
Parameters:
input dataset t_sAddressRefCreditor
    (like tqAddressByAddressType)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublictAddressRefCreditor.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublictAddressRefCreditor.after:

END PROCEDURE.
**/

/*
Procedure: GetPublictBankNumberRefCreditor
Description:
read table
Parameters:
output dataset tBankNumberRefCreditor
    (like BankNumber table)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublictBankNumberRefCreditor.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublictBankNumberRefCreditor.after:

END PROCEDURE.
**/

/*
Procedure: SetPublictBankNumberRefCreditor
Description:
write table
Parameters:
input dataset t_sBankNumberRefCreditor
    (like BankNumber table)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublictBankNumberRefCreditor.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublictBankNumberRefCreditor.after:

END PROCEDURE.
**/

/*
Procedure: GetPublictBankNumberSectionRefCreditor
Description:
read table
Parameters:
output dataset tBankNumberSectionRefCreditor
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublictBankNumberSectionRefCreditor.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublictBankNumberSectionRefCreditor.after:

END PROCEDURE.
**/

/*
Procedure: SetPublictBankNumberSectionRefCreditor
Description:
write table
Parameters:
input dataset t_sBankNumberSectionRefCreditor
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublictBankNumberSectionRefCreditor.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublictBankNumberSectionRefCreditor.after:

END PROCEDURE.
**/

/*
Procedure: GetPublictCBankNumberPayCodeRef
Description:
read table
Parameters:
output dataset tCBankNumberPayCodeRef
    (like BankNumberPayCode)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublictCBankNumberPayCodeRef.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublictCBankNumberPayCodeRef.after:

END PROCEDURE.
**/

/*
Procedure: SetPublictCBankNumberPayCodeRef
Description:
write table
Parameters:
input dataset t_sCBankNumberPayCodeRef
    (like BankNumberPayCode)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublictCBankNumberPayCodeRef.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublictCBankNumberPayCodeRef.after:

END PROCEDURE.
**/

/*
Procedure: GetPublictCInvoiceActivity
Description:
read table
Parameters:
output dataset tCInvoiceActivity
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublictCInvoiceActivity.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublictCInvoiceActivity.after:

END PROCEDURE.
**/

/*
Procedure: SetPublictCInvoiceActivity
Description:
write table
Parameters:
input dataset t_sCInvoiceActivity
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublictCInvoiceActivity.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublictCInvoiceActivity.after:

END PROCEDURE.
**/

/*
Procedure: GetPublictCInvoicePay
Description:
read table
Parameters:
output dataset tCInvoicePay
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublictCInvoicePay.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublictCInvoicePay.after:

END PROCEDURE.
**/

/*
Procedure: SetPublictCInvoicePay
Description:
write table
Parameters:
input dataset tCInvoicePay
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublictCInvoicePay.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublictCInvoicePay.after:

END PROCEDURE.
**/

/*
Procedure: GetPublictCInvoicePayment
Description:
read table
Parameters:
output dataset tCInvoicePayment
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublictCInvoicePayment.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublictCInvoicePayment.after:

END PROCEDURE.
**/

/*
Procedure: SetPublictCInvoicePayment
Description:
write table
Parameters:
input dataset t_sCInvoicePayment
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublictCInvoicePayment.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublictCInvoicePayment.after:

END PROCEDURE.
**/

/*
Procedure: GetPublictCPayFormatTypeRef
Description:
read table
Parameters:
output dataset tCPayFormatTypeRef
    (like PayFormatType)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublictCPayFormatTypeRef.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublictCPayFormatTypeRef.after:

END PROCEDURE.
**/

/*
Procedure: SetPublictCPayFormatTypeRef
Description:
write table
Parameters:
input dataset t_sCPayFormatTypeRef
    (like PayFormatType)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublictCPayFormatTypeRef.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublictCPayFormatTypeRef.after:

END PROCEDURE.
**/

/*
Procedure: GetPublicdCreditorActivity
Description:
read table
Parameters:
output dataset dCreditorActivity
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublicdCreditorActivity.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublicdCreditorActivity.after:

END PROCEDURE.
**/

/*
Procedure: SetPublicdCreditorActivity
Description:
write table
Parameters:
input dataset dCreditorActivity
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublicdCreditorActivity.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublicdCreditorActivity.after:

END PROCEDURE.
**/

/*
Procedure: GetPublictCreditorInv
Description:
read table
Parameters:
output dataset tCreditorInv
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublictCreditorInv.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublictCreditorInv.after:

END PROCEDURE.
**/

/*
Procedure: SetPublictCreditorInv
Description:
write table
Parameters:
input dataset tCreditorInv
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublictCreditorInv.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublictCreditorInv.after:

END PROCEDURE.
**/

/*
Procedure: GetPublictCreditorInvoice
Description:
read table
Parameters:
output dataset tCreditorInvoice
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublictCreditorInvoice.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublictCreditorInvoice.after:

END PROCEDURE.
**/

/*
Procedure: SetPublictCreditorInvoice
Description:
write table
Parameters:
input dataset t_sCreditorInvoice
    ()
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublictCreditorInvoice.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublictCreditorInvoice.after:

END PROCEDURE.
**/

/*
Procedure: IsOperationalReplicationEnabled
Description:
Retrieves the session value which indicates whether replication from financials to logistics is enabled
Parameters:
output olReplicationEnabled
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.IsOperationalReplicationEnabled.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.IsOperationalReplicationEnabled.after:

END PROCEDURE.
**/

/*
Procedure: MappedBufferCopy
Description:
Performs a buffer copy from a source buffer to a target buffer using the specified field mappings to copy the data.
Parameters:
input ihSourceBuffer
    (Handle to the source buffer from which the data is going to be copied.)
input ihTargetBuffer
    (Handle to the target buffer to which the data is going to be copied.)
input icBufferFieldMapping
    (Comma delimited list of the field mappings between the buffers. It does not matter if the list is in <target-buffer-field>,<source-buffer-field> order or vice versa progress will automatically switch the fields depending on is the target and source buffers.)
input icExcludeFields
    (Contains a comma delimited list of the fields that should not be copied by the from the source to the target.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MappedBufferCopy.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MappedBufferCopy.after:

END PROCEDURE.
**/

/*
Procedure: ValCharNotNULL
Description:
ValCharNotNULL: Validation-method that raises an error in case the character-field has the NULL value
Parameters:
input icTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a component temp-table.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValCharNotNULL.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValCharNotNULL.after:

END PROCEDURE.
**/

/*
Procedure: ValDateNotNULL
Description:
ValDateNotNULL: Validation-method that raises an error in case the date-field has the NULL value
Parameters:
input itTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a component temp-table.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValDateNotNULL.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValDateNotNULL.after:

END PROCEDURE.
**/

/*
Procedure: ValIntNotNULL
Description:
ValIntNotNULL: Validation-method that raises an error in case the integer-field has the NULL value
Parameters:
input igTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a component temp-table.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValIntNotNULL.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValIntNotNULL.after:

END PROCEDURE.
**/

/*
Procedure: AddDetailLine
Description:
Create a record in one of the class temp-tables.
Parameters:
input icTable
    (Database table name)
input icParentRowid
    (contents for field tc_ParentRowid (tc_Rowid of the parent record))
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.AddDetailLine.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.AddDetailLine.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalUpdates
Description:
This method is part of the SetPublicTables flow.
When executed, data in the input class tables (prefix t_s) is validated and found correct, and copied into the class tables (prefix t_o).
This method can be extended to do updates that do not require a validation or that involve running business methods of other business classes. These classes should be started with ADD-TO-TRANSACTION = 'true'. Also make sure to add these classes in method StopExternalInstances.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.AdditionalUpdates.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.AdditionalUpdates.after:

END PROCEDURE.
**/

/*
Procedure: apiDeleteInstance
Description:
Generic procedure for deleting database objects. This procedure contains the entire flow of loading the object data, validating if it can be deleted, deleting and deleting all related objects (= cascading deletes).
Parameters:
input icKey
    (Database instance key.
possible values:
'Rowid=...'
'Primary=...'
'Identity=...')
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.apiDeleteInstance.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.apiDeleteInstance.after:

END PROCEDURE.
**/

/*
Procedure: ApiDumpXmlRepresentation
Description:
Write an XML file with the object data of one or more database objects.
This XML file uses the standard schema found in <server installation folder>/xml/<class>.xsd.
It can be used as input for method ApiMaintainByXML and for the XML daemon.
Parameters:
input icRowids
    (Comma separated list of rowids of objects to include in the XML file)
input icFile
    (Full path name of the file in which the XML should be dumped.)
input ilHeaderOnly
    (When true, only the main table will be included in the generated XML representation.)
input ilSuppressEmptyFields
    (When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value.
When false, no fields will be removed.
When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be added in the header of the XML object.)
input ilWriteXMLSchema
    (When true, also include the metaschema in the XML file.)
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blanc, and all objects identified by icRowids will be dumped.)
input ilExportForInput
    (When exporting an XML file to be used for direct input, some fields should be suppressed in the output:
tContextInfo.tcInvolvedCompanyCodes
tContextInfo.tcCorrelationId
tContextInfo.tcObjectIdentifier
all '*_ID' fields
all 'tc_Status' fields
(BLF-1908))
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiDumpXmlRepresentation.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiDumpXmlRepresentation.after:

END PROCEDURE.
**/

/*
Procedure: ApiDumpXmlRepresentationV01
Description:
Write an XML file with the object data of one or more database objects.
This XML file uses the standard schema found in <server installation folder>/xml/<class>.xsd.
It can be used as input for method ApiMaintainByXML and for the XML daemon.
Parameters:
input ipRowids
    (Comma separated list of rowids of objects to include in the XML file)
input icFile
    (Full path name of the file in which the XML should be dumped.)
input ilHeaderOnly
    (When true, only the main table will be included in the generated XML representation.)
input ilSuppressEmptyFields
    (When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value.
When false, no fields will be removed.
When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be added in the header of the XML object.)
input ilWriteXMLSchema
    (When true, also include the metaschema in the XML file.)
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blanc, and all objects identified by icRowids will be dumped.)
input ilExportForInput
    (When exporting an XML file to be used for direct input, some fields should be suppressed in the output:
tContextInfo.tcInvolvedCompanyCodes
tContextInfo.tcCorrelationId
tContextInfo.tcObjectIdentifier
all '*_ID' fields
all 'tc_Status' fields
(BLF-1908))
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiDumpXmlRepresentationV01.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiDumpXmlRepresentationV01.after:

END PROCEDURE.
**/

/*
Procedure: ApiForcePublish
Description:
Publish any business object in event publishing.
Parameters:
input dataset tObject
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiForcePublish.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiForcePublish.after:

END PROCEDURE.
**/

/*
Procedure: ApiForcePublishWithEventType
Description:
Publish any business object in event publishing.
Parameters:
input dataset tObject
    ()
input icEventType
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiForcePublishWithEventType.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiForcePublishWithEventType.after:

END PROCEDURE.
**/

/*
Procedure: ApiGetIdentification
Description:
This method gives the possibility to get identification information (primary key, alternate key, rowid, object ID, object status) of the main table of the object, based on any of the keys of the table.
NOTE: for some business components, a few functions must be implemented manually :
- loading data starting from the alternate key
- defining the alternate key field names + values, starting from any of the other keys
(This is when the alternate key cannot be defined unambiguously by CB.)
Parameters:
input-output bcPrimaryKey
    (The primary key value of the main table of the object.
In case of a combined primary key, the different values should be separated with chr(2))
input-output bcAlternateKey
    (The alternate key value of the main table of the object.
In case of a combined alternate key, the different values should be separated with chr(2))
input-output bcRowid
    (The rowid of the main table record of the object.)
input-output bgObjectId
    (Identity field of the main table of the object.)
output ocObjectStatusValues
    (chr(2) seperated list of value of object status fields)
output ocObjectStatusFieldNames
    (Comma seperated list of field name of object status fields)
output ocPrimaryKeyFieldNames
    (List of primary key fields of the main table of the object.
This is a comma separated list.)
output ocAlternateKeyFieldNames
    (List of alternate key fields (names) of the main table of the object.
This is a comma separated list.)
output ocAlternateKeyFieldLabels
    (List of alternate key fields (translated labels) of the main table of the object.
This is a chr(2) separated list.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiGetIdentification.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiGetIdentification.after:

END PROCEDURE.
**/

/*
Procedure: ApiGetRoleScopeValues
Description:
Roles can be scoped to a single object (like for example a single project).
Run this method on the corresponding business component (= bproject) to get a list of possible objects (= projects) to scope a role to.
Parameters:
input igCompanyID
    (current CompanyID)
input igSharedSetID
    (current SharedSetID)
input icBusComponentConcept
    (BusComponentConcept of the business-component)
output ocRoleScopeValues
    (chr(2) separated list with the RoleScopeValues)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiGetRoleScopeValues.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiGetRoleScopeValues.after:

END PROCEDURE.
**/

/*
Procedure: apiMaintainByXml
Description:
Generic method for creating or updating object data.
This method provides the same functionality as the XML daemon.
Parameters:
input imDocument
    (contents of the XML document (or use parameter icFileName))
input icFileName
    (file name of the xml document (or use parameter imDocument))
output olSuccess
    (update completed successfully)
output dataset tXmlObjects
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.apiMaintainByXml.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.apiMaintainByXml.after:

END PROCEDURE.
**/

/*
Procedure: ApiReplicate
Description:
This is a generic procedure for updating database objects. This procedure is capable of handling multiple objects in one run, but cannot save draft instances if the input data is incorrect, like procedure ApiMaintainByDataset can.
Parameters:
input dataset-handle izInputData by-reference
    (class dataset)
input icActivityCode
    (Activity code (CREATE or MODIFY or DELETE) determines the kind of update. Value of tc_Status in the input data is ignored.
When empty, CREATE or UPDATE is assumed, depending on whether the input data already exists in the application database.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiReplicate.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiReplicate.after:

END PROCEDURE.
**/

/*
Procedure: BufferCopy
Description:
This method can be used to copy data from one temp-table to another.  It takes care about the normal fields, but also the temp-table fields (with prefix t<datatype>).
It copies all fields from the current record in the temp-table represented by ihFrom, to the current record in the temp-table represented by ihTo.
Parameters:
input ihFrom
    (The handle to the temp-table from which you want to copy the content.)
input ihTo
    (Handle to the temp-table to which you want to copy the content.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.BufferCopy.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.BufferCopy.after:

END PROCEDURE.
**/

/*
Procedure: Calculate
Description:
Add code here to initialize the calculated fields of the class temp-tables after loading existing records from the application database.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.Calculate.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.Calculate.after:

END PROCEDURE.
**/

/*
Procedure: CalculateMark
Description:
Parameters:
output oiCount1
    (Counts the total number of records in t* table which are read.)
output oiCount2
    (Counts the total number of records which are created in tAlreadyCalculatedRecords.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.CalculateMark.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.CalculateMark.after:

END PROCEDURE.
**/

/*
Procedure: CheckValidationExceptionList
Description:
Evaluate updates in the class temp-tables.
If updates other than to fields listed in vcValidationExceptionList are found return true, otherwise return false.
Parameters:
input ilValidateInputData
    (When true, evaluate the input data (= tables with prefix t_s).
When false, evaluate the business data (= tables with prefix t_o).)
output olDoValidation
    ()
*/
/**
PROCEDURE BCreditor.CheckValidationExceptionList.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.CheckValidationExceptionList.after:

END PROCEDURE.
**/

/*
Procedure: ClearData
Description:
Remove contents of all class temp-tables.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ClearData.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ClearData.after:

END PROCEDURE.
**/

/*
Procedure: ConvertXmlToTable
Description:
read xml node and write to class temp-tables (t_s***)
Parameters:
input ihParentNode
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ConvertXmlToTable.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ConvertXmlToTable.after:

END PROCEDURE.
**/

/*
Procedure: CorrectionForPartialUpdate
Description:
Correct the data in the S buffer for a partial update

first, take care about the buffers with tc_status = "D".  If their rowid is not in the list of vcForceDeleteRowids, then they should be marked as tc_status = "" 

then, make sure to copy the O buffer value of fields that are in vcNeglectableFields to the S buffer
Parameters:
input icPartialUpdateExceptionList
    (Comma separated list with fields that need to be skipped in the test logic for partial update.
Fields in the list are specified as t<table>.<field>.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.CorrectionForPartialUpdate.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.CorrectionForPartialUpdate.after:

END PROCEDURE.
**/

/*
Procedure: DataDelete
Description:
Validate if current database instance(s) present in the class temp-tables can be deleted in the application database. If so, set status to 'D'. Records will be removed from the database on commit of the transaction.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.DataDelete.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DataDelete.after:

END PROCEDURE.
**/

/*
Procedure: DataDescription
Description:
Returns a table with metadata on all tables in the class dataset.
Useful for writing generic code that reads or updates these tables.
Parameters:
input ilAllTables
    (true = return all class tables
false = return only database tables)
input icDataLoadInputType
    (This parameter replaces the old parameters icRowids, icPkey, icObjectIds and matches the parameter icDataLoadInputType of the DataLoadByTable method. As only the DataLoadByTable method uses the tDataLoadInput table this parameter should be empty string for all other calls to the DataDescription method.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.DataDescription.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DataDescription.after:

END PROCEDURE.
**/

/*
Procedure: DataLoad
Description:
Load data from the database into the class temp-tables of the business class.
Records can be selected based on primary keys (full or partly), rowids or identity values.
Parameters:
input icRowids
    (Comma seperated list of rowids of records of the main table, converted to string format.)
input icPkeys
    (List of the values of the primary key fields of records of the main table.
Fields are chr(2) seperated, keys are chr(4) seperated.
Fields are listed in the order as they appear in the primary index. You are not obliged to give a value for all fields of the primary index, but the list cannot contain any 'gaps'.)
input icObjectIds
    (Comma seperated list of values of the identity field of records of the main table.)
input icFreeform
    (In case none of the standard keys (primary, rowid, identity) are available, you can load data based on a freeform for each statement on the main table of the business class.
This for each statement should not contain break by, sorting or no-lock options.)
input ilKeepPrevious
    (True if the data to load must be added to the already existing data in the class temp-tables.
False if the data to load must replace the already existing data.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.DataLoad.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DataLoad.after:

END PROCEDURE.
**/

/*
Procedure: DataLoadByInput
Description:
This method loads database records corresponding to input values (records found in the t_s*** tables).
When nothing found in the database, a new record should be initialised.
Input values should also be updated with :
- identity fields (override input values)
- tc_Rowid / tc_ParentRowid / tc_Status
Parameters:
output opPrimeKey
    (Primary Key field value of loaded record(s).
Keys are chr(4) separated.
Key fields are chr(2) separated.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.DataLoadByInput.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DataLoadByInput.after:

END PROCEDURE.
**/

/*
Procedure: DataLoadByTable
Description:
This version of method DataLoad reads data based on keys stored in table tDataLoadInput.
Method scope is protected as this method is only intended to be used internally.
Parameters:
input icDataLoadInputType
    (Type of data entered in the tDataLoadInput table:
{&DATALOADINPUT-TYPE-ROWID}
 load by rowid stored in tDataLoadInput.trRowid
{&DATALOADINPUT-TYPE-OBJECTID}
 load by object ID stored in tDataLoadInput.tiObjectId
{&DATALOADINPUT-TYPE-PRIMKEY}
 load by primary key value stored in tDataLoadInput.tcPKey
 field values are chr(2) separated)
input ilKeepPrevious
    (True if the data to load must be added to the already existing data in the class temp-tables.
False if the data to load must replace the already existing data.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.DataLoadByTable.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DataLoadByTable.after:

END PROCEDURE.
**/

/*
Procedure: DataNew
Description:
Create a new database instance in the class temp-tables. Existing contents of the class temp-tables will be discarded.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.DataNew.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DataNew.after:

END PROCEDURE.
**/

/*
Procedure: DataSave
Description:
Write the data of current instance to the database.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.DataSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DataSave.after:

END PROCEDURE.
**/

/*
Procedure: DataSaveWorker
Description:
A sub part of the transaction process.
This function must be public, so it can be called from the transaction component, but should not be used directly by the developer.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.DataSaveWorker.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DataSaveWorker.after:

END PROCEDURE.
**/

/*
Procedure: DumpXmlRemoveFieldsNotForInput
Description:
remove fields from the xml that are irrelevant to direct input
Parameters:
input ihTableNode
    (x-noderef object)
*/
/**
PROCEDURE BCreditor.DumpXmlRemoveFieldsNotForInput.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DumpXmlRemoveFieldsNotForInput.after:

END PROCEDURE.
**/

/*
Procedure: DumpXmlRepresentation
Description:
Write an XML file with the object data of the database object(s) currently in memory.
This XML file uses the standard schema found in <server installation folder>/xml/<class>.xsd.
It can be used as input for method ApiMaintainByXML and for the XML daemon.
Parameters:
input icFile
    (Full path name of the file in which the XML should be dumped.)
input ilHeaderOnly
    (indicates whether only the main table should be used in the generated XML representation.)
input ilSuppressEmptyFields
    (When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value.
When false, no fields will be removed.
When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be supported in the header of the Xml string.)
input ilWriteXMLSchema
    (Also include the metaschema in the XML file)
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blanc, and all objects in memory will be dumped.)
input ilExportForInput
    (When exporting an XML file to be used for direct input, some fields should be suppressed in the output:
tContextInfo.tcInvolvedCompanyCodes
tContextInfo.tcCorrelationId
tContextInfo.tcObjectIdentifier
all '*_ID' fields
all 'tc_Status' fields
(BLF-1908))
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.DumpXmlRepresentation.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DumpXmlRepresentation.after:

END PROCEDURE.
**/

/*
Procedure: DumpXmlToLongchar
Description:
Write an XML representation of the database object(s) currently in memory to a longchar.
This XML representation uses the standard schema found in <server installation folder>/xml/<class>.xsd.
Parameters:
input ilHeaderOnly
    (indicates whether only the main table should be used in the generated XML representation.)
input ilSuppressEmptyFields
    (When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value.
When false, no fields will be removed.
When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be supported in the header of the Xml string.)
input ilWriteXMLSchema
    (Also include the metaschema in the XML file)
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blanc, and all objects in memory will be dumped.)
input ilExportForInput
    (When exporting an XML file to be used for direct input, some fields should be suppressed in the output:
tContextInfo.tcInvolvedCompanyCodes
tContextInfo.tcCorrelationId
tContextInfo.tcObjectIdentifier
all '*_ID' fields
all 'tc_Status' fields
(BLF-1908))
output opXmlRepresentation
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.DumpXmlToLongchar.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DumpXmlToLongchar.after:

END PROCEDURE.
**/

/*
Procedure: EventPublishing
Description:
Wrapper for method PublishEvent, loop through all database objects in memory.
Parameters:
input ilForcePublish
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.EventPublishing.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.EventPublishing.after:

END PROCEDURE.
**/

/*
Procedure: EventPublishingLookForUpdates
Description:
look for a record in the class tables with updates (tc_Status not empty)
Parameters:
input icParentTable
    ()
input icParentRowid
    ()
input-output bcQueryNames
    ()
input-output bcQueryHandles
    ()
output olUpdateFound
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.EventPublishingLookForUpdates.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.EventPublishingLookForUpdates.after:

END PROCEDURE.
**/

/*
Procedure: GetActivities
Description:
Return a list of defined activity codes that can be performed by current user on any object of current class. Activities that cannot be run from the appshell (activity sequence = 0) are not included.
Parameters:
output dataset tActivities
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetActivities.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetActivities.after:

END PROCEDURE.
**/

/*
Procedure: GetActivitiesForObject
Description:
Return a list of defined activity codes that can be performed by current user on a specific object of current class. Activities that cannot be run from the appshell (activity sequence = 0) are not included.
Parameters:
input igObjectId
    (identity value)
input icUserLogin
    (User that will perform the activity
(Optional : when both icUserLogin and iiRoleId are empty, current user (from Session.Login) will be used))
input igRoleId
    (Role that will perform the activity
(Optional : when both icUserName and iiRoleId are empty, current user (from Session.Login) will be used))
output dataset tActivities
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetActivitiesForObject.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetActivitiesForObject.after:

END PROCEDURE.
**/

/*
Procedure: GetActivitiesForStatus
Description:
Returns a list of activities allowed on current object in the class temp-tables, based on the status of the object.
Blanc =  all activities allowed.
Parameters:
input igObjectId
    (Object ID)
output ocActivityCodes
    ()
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.GetActivitiesForStatus.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetActivitiesForStatus.after:

END PROCEDURE.
**/

/*
Procedure: GetBusinessFieldsGenCode
Description:
Parameters:
input icGenCode
    ()
output ocValueList
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetBusinessFieldsGenCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetBusinessFieldsGenCode.after:

END PROCEDURE.
**/

/*
Procedure: GetContextInfo
Description:
return a handle to the tContextInfo temp-table
Parameters:
output ohContextInfo
    ()
*/
/**
PROCEDURE BCreditor.GetContextInfo.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetContextInfo.after:

END PROCEDURE.
**/

/*
Procedure: GetCustomFieldList
Description:
Returns a list of available custom fields
Parameters:
output ocFieldList
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetCustomFieldList.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetCustomFieldList.after:

END PROCEDURE.
**/

/*
Procedure: GetPKValues
Description:
Get the value of primary key fields of current record in a class temp-table.
Parameters:
input ihBuffer
    (handle to class temp-table buffer)
output ocPKValue
    (chr(2) seperated list of field values)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetPKValues.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPKValues.after:

END PROCEDURE.
**/

/*
Procedure: GetXmlRepresentationDataset
Description:
Get a dataset with the object data of the database object(s) currently in memory.
This dataset uses the standard schema found in <server installation folder>/xml/<class>.xsd.
Parameters:
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blanc, and all objects in memory will be dumped.)
input ilHeaderOnly
    (indicates whether only the main table should be used in the generated XML representation.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be supported in the header of the Xml string.)
output dataset-handle ozXMLDataset by-reference
    (This parameter should always be passed by-reference, meaning, the dataset handle should be created before the call.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetXmlRepresentationDataset.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetXmlRepresentationDataset.after:

END PROCEDURE.
**/

/*
Procedure: GetXmlRepresentationDSAddTable
Description:
Parameters:
input icTableName
    ()
input ictcRowid
    ()
input ictcParentRowid
    ()
input ilHeaderOnly
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetXmlRepresentationDSAddTable.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetXmlRepresentationDSAddTable.after:

END PROCEDURE.
**/

/*
Procedure: HandleSuppressEmptyFields
Description:
Method that is called recursively to handle the suppress emtpy fields option of DumpXmlRepresentation.
Parameters:
input ihParent
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.HandleSuppressEmptyFields.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.HandleSuppressEmptyFields.after:

END PROCEDURE.
**/

/*
Procedure: InitialValues
Description:
Add code here to initialize the calculated fields of a 'new' record (= a record that must be created in the application database) in a class temp-table.
Parameters:
input icTableName
    (Name of the database table of which a record is created in the class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.InitialValues.before:

END PROCEDURE.
**/




/*
Procedure: MaintainByDataset
Description:
This method uses contents of the input class temp-tables (prefix t_s) to perform the action specified in icAction.
SAVE : validate contents and write to database if correct
SAVEDRAFT : validate contents, write to database if correct, copy the data to the class tables (prefix t_o) and create draft instance if incorrect
DRAFT : copy data to the class tables (prefix t_o) and create draft instance
VALIDATE : only validate data
Parameters:
input icAction
    (SAVE
SAVEDRAFT
DRAFT
VALIDATE)
output opPrimaryKey
    ()
output opRowid
    ()
output oiDraftInstance
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MaintainByDataset.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MaintainByDataset.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetDefaulting
Description:
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MaintainByDatasetDefaulting.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MaintainByDatasetDefaulting.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutput
Description:
This method uses contents of the input class temp-tables (prefix t_s) to perform the action specified in icAction. (if icAction is empty, it gets the default value of "SAVE")
SAVE : validate contents and write to database if correct
SAVEDRAFT : validate contents, write to database if correct, copy the data to the class tables (prefix t_o) and create draft instance if incorrect
DRAFT : copy data to the class tables (prefix t_o) and create draft instance
VALIDATE : only validate data

It returns the object dataset if required (if ilProvideOutput = true).
Parameters:
input icAction
    (SAVE
SAVEDRAFT
DRAFT
VALIDATE)
input ilReturnDataset
    (Indication whether the logic should return the official dataset of the object that has just been created/modified.)
input ilPartialUpdate
    (Indication whether the input dataset is a full object or only a partial one.)
input icPartialUpdateExceptionList
    (Comma separated list with fields that need to be skipped in the test logic for partial update.
Fields in the list are specified as t<table>.<field>.)
output opPrimaryKey
    (Primary Key field value of the tackled record(s) of the main table of the object,
Keys are chr(4) separated.
Key fields are chr(2) separated.)
output opRowid
    (Comma separated list of the rowids of the tackled record(s) of the main table of the object,)
output oiDraftInstance
    (Instance-ID of the created Draft)
output ocPrimaryKeyName
    (The name of the field(s) in the primary key of the object.  Normally this is the name of the object ID of the main table. (like creditor_ID))
output dataset-handle ozObjectRepresentation by-reference
    (The dataset containing the official representation of the object dataset. It should always be passed by-reference, meaning, the dataset handle should be created before the call.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutput.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutput.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputInit
Description:
This method is a sub-method of MaintainByDatasetWithOutput and holds the code that should only be executed once in the very beginning of this method
Parameters:
input-output bcAction
    (SAVE
SAVEDRAFT
DRAFT
VALIDATE)
output opPrimaryKey
    (Primary Key field value of the tackled record(s) of the main table of the object,
Keys are chr(4) separated.
Key fields are chr(2) separated.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputInit.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputInit.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMain
Description:
MaintainByDatasetWithOutputMain: This method is a sub-method of MaintainByDatasetWithOutput and will either process all objects in a single transaction, either in a sperate transaction for every object - with the option that if doing everything in a single transaction fails, then process them one by one in a single transaction. 
NOTE: this is a recursive method (calling itself)
Parameters:
input icAction
    (SAVE
SAVEDRAFT
DRAFT
VALIDATE)
input ilReturnDataset
    (Indication whether the logic should return the official dataset of the object that has just been created/modified.)
input ilPartialUpdate
    (Indication whether the input dataset is a full object or only a partial one.)
input icPartialUpdateExceptionList
    (Comma separated list with fields that need to be skipped in the test logic for partial update.
Fields in the list are specified as t<table>.<field>.)
output opRowid
    (Comma separated list of the rowids of the tackled record(s) of the main table of the object,)
output oiDraftInstance
    (Instance-ID of the created Draft)
output ocPrimaryKeyName
    (The name of the field(s) in the primary key of the object.  Normally this is the name of the object ID of the main table. (like creditor_ID))
output dataset-handle ozObjectRepresentation by-reference
    (The dataset containing the official representation of the object dataset. It should always be passed by-reference, meaning, the dataset handle should be created before the call.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMain.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMain.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMainCustTransTables
Description:
MaintainByDatasetWithOutputMainCustTransTables: This is a submethod of MaintainByDatasetWithOutputMain and MaintainByDatasetWithOutputMainSubTables that handles the CustTables and the TransString
Parameters:
input icTcRowidOfTheTTable
    (icTcRowidOfTheTTable: field tc_rowid of the t-record we just tackled in table tTempFcDynRel.thFcBuffer and that will be used as the parent-record in this method)
input igIDOfTheTTable
    (iiIDOfTheTTable: field xxx_ID of the t-record we just tackled in table tTempFcDynRel.thFcBuffer and that will be used as the parent-record in this method)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMainCustTransTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMainCustTransTables.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMainPreOneByOne
Description:
MaintainByDatasetWithOutputMainPreOneByOne: This empty method is a sub-method of MaintainByDatasetWithOutputMain and is run at the beginning of processing the all objects one per one in a separate transaction
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMainPreOneByOne.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMainPreOneByOne.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMainPreSave
Description:
MaintainByDatasetWithOutputMainPreSave: This empty method is a sub-method of MaintainByDatasetWithOutputMain and can be used to hold code that needs to be executed in case of processing the input of ApiMaintainByDatasetWithoutput one-by-one. In that case this method is executed for every transaction holding just one object and right before this data gets validated and saved.

Note the instance-data to handle is in the t_s-tables
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMainPreSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMainPreSave.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMainSave
Description:
This method is a sub-method of MaintainByDatasetWithOutputMain and holds the code that executes the actual saving or validating or storing of the instance-data.
Parameters:
input icAction
    (SAVE
SAVEDRAFT
DRAFT
VALIDATE)
input ilReturnDataset
    (Indication whether the logic should return the official dataset of the object that has just been created/modified.)
input ilPartialUpdate
    (Indication whether the input dataset is a full object or only a partial one.)
input icPartialUpdateExceptionList
    (Comma separated list with fields that need to be skipped in the test logic for partial update.
Fields in the list are specified as t<table>.<field>.)
input ilReturnPrimaryKey
    (Set to true in case you want this method to fill in output param PrimaryKey)
input-output bcPrimaryKeyName
    (The name of the field(s) in the primary key of the object.  Normally this is the name of the object ID of the main table. (like creditor_ID).
Input-output param: in case the input value is already filled then it will not be changed)
output opRowid
    (Comma separated list of the rowids of the tackled record(s) of the main table of the object,)
output oiDraftInstance
    (Instance-ID of the created Draft)
output dataset-handle ozObjectRepresentation by-reference
    (The dataset containing the official representation of the object dataset. It should always be passed by-reference, meaning, the dataset handle should be created before the call.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMainSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMainSave.after:

END PROCEDURE.
**/

/*
Procedure: MaintainByDatasetWithOutputMainSubTables
Description:
MaintainByDatasetWithOutputMainSubTables: This is a submethod of MaintainByDatasetWithOutputMain that is called recusrsively and handles the copy of the instance-data from tTempFcDynRel to the real instance-tables
Parameters:
input icTableNameOfParent
    (TableNameOfParent: the name of the table the caller has tackled(tTempFcDynRel.tcFcTo) and that will be used as the parent-table in this method)
input icTcRowidOfTheTTable
    (icTcRowidOfTheTTable: field tc_rowid of the t-record we just tackled in table tTempFcDynRel.thFcBuffer and that will be used as the parent-record in this method)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMainSubTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MaintainByDatasetWithOutputMainSubTables.after:

END PROCEDURE.
**/

/*
Procedure: ObjectStatusUpdate
Description:
This procedure contains code to be executed when the database object changes status.
This includes object creation.
This does not include object delete.
Parameters:
input icStatusFieldName
    ()
input icOldStatus
    (old status)
input icNewStatus
    (new status)
input igObjectId
    (identity field value)
input icObjectRowid
    (tc_Rowid of main table)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ObjectStatusUpdate.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ObjectStatusUpdate.after:

END PROCEDURE.
**/

/*
Procedure: PartialSetSTables
Description:
Method to set a dataset in the t_s temp-tables, based on a dataset-handle as input.
This is a variation of the SetSTables method, in the sense that it accepts a dataset as input that has an incomplete structure.  Some fields might be missing from the dataset that is sent in.
If fields are missing from the input, the value in the t_s buffer will be the unknown value (?).  It is the intention that in the rest of the flow of processing the data, these fields are treated separately, to make sure the original value of the changed record is not overwritten with the unknown value.
Parameters:
input dataset-handle izDatasetHandle by-reference
    (The input parameter holding a handle to the dataset with the input values. This must always be a subset of the official object dataset.  It might have missing fields.)
input ilIsPartialUpdate
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.PartialSetSTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.PartialSetSTables.after:

END PROCEDURE.
**/

/*
Procedure: PopulateXDocument
Description:
Populate the passed document handle with an XML representation of the database object(s) currently in memory.
This XML representation uses the standard schema found in <server installation folder>/xml/<class>.xsd.
Parameters:
input icObjectRowId
    (If you want to restrict dumped data to a single object, pass the rowid of the object.
Otherwise leave blank, and all objects in memory will be dumped.)
input ilHeaderOnly
    (indicates whether only the main table should be used in the generated XML representation.)
input ilSuppressEmptyFields
    (When true, blank fields will be removed from the XML Representation. Blank means empty string, or unknown value for all other data types. Zero is not considered an empty value.
When false, no fields will be removed.
When unknown value, fields with value identical to the default value of that column will be removed. If actual value is the unknown value, and the default value is not unknown value, this unknown value will not be removed.)
input iiPriority
    (If Priority is different from 0, an additional tag (Priority) will be supported in the header of the Xml string.)
input ilWriteXMLSchema
    (Also include the metaschema in the XML file)
input ilExportForInput
    (When exporting an XML file to be used for direct input, some fields should be suppressed in the output:
tContextInfo.tcInvolvedCompanyCodes
tContextInfo.tcCorrelationId
tContextInfo.tcObjectIdentifier
all '*_ID' fields
all 'tc_Status' fields
(BLF-1908))
input ihDocument
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.PopulateXDocument.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.PopulateXDocument.after:

END PROCEDURE.
**/

/*
Procedure: PostSave
Description:
Actions to take after writing current instance to the database, and before final commit of the transaction.
Use the field tc_status to test the status of the updated records:
'' = unchanged
'N' = new
'C' = changed
'D' = deleted
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.PostSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.PostSave.after:

END PROCEDURE.
**/

/*
Procedure: PostTransaction
Description:
Actions to take after final commit of the transaction.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.PostTransaction.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.PostTransaction.after:

END PROCEDURE.
**/

/*
Procedure: PreSave
Description:
Actions to take before writing current instance to the database (inside the db transaction!).
Use the field tc_status to test the status of the updated records:
'' = unchanged
'N' = new
'C' = changed
'D' = deleted
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.PreSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.PreSave.after:

END PROCEDURE.
**/

/*
Procedure: PublishEvent
Description:
Check if any event publishing is active for current class and publish (= create a request for the event daemon) the update if there is.
Parameters:
input ilAllChanges
    ()
input icStatusFieldName
    ()
input icOldStatus
    ()
input icNewStatus
    ()
input igObjectID
    ()
input icObjectRowid
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.PublishEvent.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.PublishEvent.after:

END PROCEDURE.
**/

/*
Procedure: ReadObjectSecurity
Description:
Returns object security on currently loaded (with DataLoad) object
Parameters:
output dataset tSelectedActivities
    ()
output dataset tSelectedUsers
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ReadObjectSecurity.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ReadObjectSecurity.after:

END PROCEDURE.
**/

/*
Procedure: ReadTable
Description:
Read field values of a specific record in one of the class temp-tables.
(Used from referential integrity)
Parameters:
input icTableName
    (class temp-table name)
input icQuery
    (read statement)
input icFieldNames
    (Comma seperated list of table field names)
input ilConvertToDisplayFormat
    (Only relevant for decimal or date fields)
output ocFieldValues
    (chr(3) seperated list of the field values (if a record is found))
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ReadTable.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ReadTable.after:

END PROCEDURE.
**/

/*
Procedure: SetNewStatus
Description:
Change the status of all current class temp-table records to 'N'.
Useful for making a copy of a database instance.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.SetNewStatus.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetNewStatus.after:

END PROCEDURE.
**/

/*
Procedure: SetRowidConvert
Description:
Creates or updates a tFcRowidConvert record to link client rowids to instance rowids.
Parameters:
input icOldRowid
    ()
input icNewRowid
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.SetRowidConvert.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetRowidConvert.after:

END PROCEDURE.
**/

/*
Procedure: StopExternalInstances
Description:
Stop instances that are started in AdditionalUpdates as part of current transaction
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.StopExternalInstances.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.StopExternalInstances.after:

END PROCEDURE.
**/

/*
Procedure: UndoStatus
Description:
Remove all records from tFcRowidConvert created during last transaction, because this transaction was rolled back.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.UndoStatus.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.UndoStatus.after:

END PROCEDURE.
**/

/*
Procedure: UpdateLastModified
Description:
update LastModified*** fields
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.UpdateLastModified.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.UpdateLastModified.after:

END PROCEDURE.
**/

/*
Procedure: UpdateStatus
Description:
Reset field tc_Status of the class temp-tables to blanc, after the transaction is completed.
Replace dummy rowid's in field tc_Rowid and tc_ParentRowid with the real ones.
(wrapper for the generated method)
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.UpdateStatus.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.UpdateStatus.after:

END PROCEDURE.
**/

/*
Procedure: UpdateWorkobject
Description:
When updating a database object that is registered in workflow, lookup the corresponding work object and update the status of it (either return the work object to sender or delete it).
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.UpdateWorkobject.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.UpdateWorkobject.after:

END PROCEDURE.
**/

/*
Procedure: ValCharForbiddenCharCodes
Description:
Validation mask to check if a certain field contains any characters commonly used as field separator, like pipe(|) or comma(,), and return an error if it does.
Parameters:
input icTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a component temp-table.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValCharForbiddenCharCodes.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValCharForbiddenCharCodes.after:

END PROCEDURE.
**/

/*
Procedure: ValCharMandatory
Description:
Validation mask: character field cannot be empty.
Parameters:
input icTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.ValCharMandatory.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValCharMandatory.after:

END PROCEDURE.
**/

/*
Procedure: ValDateMandatory
Description:
Validation mask: date field cannot be empty.
Parameters:
input itTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.ValDateMandatory.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValDateMandatory.after:

END PROCEDURE.
**/

/*
Procedure: ValDecMandatory
Description:
Validation mask: decimal field cannot be empty (= unknown value).
Parameters:
input idTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.ValDecMandatory.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValDecMandatory.after:

END PROCEDURE.
**/

/*
Procedure: ValDecNotZero
Description:
Validation mask: decimal field cannot be zero.
Parameters:
input idTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.ValDecNotZero.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValDecNotZero.after:

END PROCEDURE.
**/

/*
Procedure: ValidateActivityCode
Description:
check if current user has permission to perform current activity on current object(s)
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValidateActivityCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValidateActivityCode.after:

END PROCEDURE.
**/

/*
Procedure: ValidateBC
Description:
Validate the class temp-tables, when values are created / modified in the business class.
Because all validations are written on the t_s*** tables, and business code maintains it's data in the t_o*** tables, data from the t_o*** tables is first copied into the t_s*** tables, and copied back after the validation (in case the validation updated some fields).
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValidateBC.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValidateBC.after:

END PROCEDURE.
**/

/*
Procedure: ValidateComponent
Description:
Write here all tests on database update (new / modify / delete) that cannot be coded with a validation mask.
The type of update can be found in tc_status (N/C/D).
If you find incorrect data, you must write an entry in tFcMessages (using SetMessage) and set the return status of this method to either +1 or -1.
Return status +1 = data will still be accepted.
Return status -1 = data will not be accepted.
This method is run from SetPublicTables, before transferring the received data into the class temp-tables.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.ValidateComponent.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValidateComponent.after:

END PROCEDURE.
**/

/*
Procedure: ValidateCustomFields
Description:
Check if values on active custom fields meet the validation criteria in the definition of the custom field and return an error if they don't.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValidateCustomFields.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValidateCustomFields.after:

END PROCEDURE.
**/

/*
Procedure: ValidateCustomFieldsGenCode
Description:
Parameters:
input icGenCode
    ()
input icFieldName
    ()
input icFieldValue
    ()
input icRowid
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValidateCustomFieldsGenCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValidateCustomFieldsGenCode.after:

END PROCEDURE.
**/

/*
Procedure: ValidateFieldSecurity
Description:
This method validates the field security on the business side. It verifies that business fields that may not be modified are not modified.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValidateFieldSecurity.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValidateFieldSecurity.after:

END PROCEDURE.
**/

/*
Procedure: ValidateUI
Description:
Validate the class temp-tables, when values are created / modified by a user interface class, and sent to the business class as input parameter of a public method, other than SetPublicTables.
When data in the t_s*** tables is correct, it is copied into the t_o***tables.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValidateUI.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValidateUI.after:

END PROCEDURE.
**/

/*
Procedure: ValIntMandatory
Description:
Validation mask: integer cannot be empty (= unknown value).
Parameters:
input igTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.ValIntMandatory.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValIntMandatory.after:

END PROCEDURE.
**/

/*
Procedure: ValIntNotZero
Description:
Validation mask: integer field cannot be zero.
Parameters:
input igTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.ValIntNotZero.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValIntNotZero.after:

END PROCEDURE.
**/

/*
Procedure: ValIsActive
Description:
On relations to a table with an 'IsActive' field, use this validation mask to check the field and return an error if an object that is not active is referenced.
Parameters:
input icTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a component temp-table.)
input ilIsActive
    (Active flag)
input icParentObjectLabel
    (parent object)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValIsActive.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValIsActive.after:

END PROCEDURE.
**/

/*
Procedure: ValLogMandatory
Description:
Validation mask: logical field cannot be empty.
Parameters:
input ilTargetField
    (Value of the business field to validate.)
input icTargetFieldName
    (Name of the business field to validate.)
input icRowid
    (Contents of field tc_Rowid, if the target field is a field of a class temp-table.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ValLogMandatory.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValLogMandatory.after:

END PROCEDURE.
**/

/*
Procedure: ValueChanged
Description:
Check if a business field has changed value.
Parameters:
input icFieldName
    ()
output olChanged
    ()
*/
/**
PROCEDURE BCreditor.ValueChanged.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ValueChanged.after:

END PROCEDURE.
**/

/*
Procedure: WriteObjectSecurity
Description:
Create or update object security for the database object available in the class dataset.
Parameters:
input dataset tSelectedActivities
    ()
input dataset tSelectedUsers
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.WriteObjectSecurity.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.WriteObjectSecurity.after:

END PROCEDURE.
**/

/*
Procedure: XmlColumnDetail
Description:
This method is called from within the generic code to create an XML representation of a component instance.  It is called for each column in the component that is represented in the XML document.
In this method, one can add method calls to other components for sub-representations.  For example: customer information on an order object.

/**  EXAMPLE CODE
assign oiReturnStatus = -98.

case icTableName :
    when "order":U
    then case icColumnName :
            when "custnum":U
            then do :
                if not available torder or
                   rowid(tOrder) <> ihBuffer:rowid
                then buffer tOrder:find-by-rowid(ihBuffer:rowid) no-error.
                if available tOrder
                then do :
                run XMLrepresentation (input  torder.custnum (icKey), 
                                input  'customer.name':U (icColumns), 
                                input  ihCurrentNode (ihStartingNode), 
                                output viFcReturnSuper (oiReturnStatus)) in bOrder
                end.
            end.
         end case.
end case.
assign oiReturnStatus = viFcReturnSuper.
**/
Parameters:
input icTableName
    (Name of the (class) table to which the column belongs.)
input icColumnName
    (Name of the concerning column)
input ihBuffer
    (Handle to the table buffer)
input ihField
    ()
input ihParentNode
    (Handle to the current XML node.)
input ilSuppressEmptyFields
    (if true, the empty fields will be dropped out of the xml representation.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.XmlColumnDetail.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.XmlColumnDetail.after:

END PROCEDURE.
**/

/*
Procedure: XmlObjectDetail
Description:
This method is called from within the generic code to create an XML representation of a component instance.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.XmlObjectDetail.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.XmlObjectDetail.after:

END PROCEDURE.
**/

/*
Procedure: XmlTableDetail
Description:
This method is called from within the generic code to create an XML representation of a component instance.  It is called for each table in the component that is represented in the XML document.
In this method, one can add method calls to other components for sub-representations.  For example: customer information on an order object.
Parameters:
input icTableName
    (Database table name)
input ihBuffer
    (handle to temp-table buffer (with current record available))
input ihParentNode
    (node handle in the XML document)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.XmlTableDetail.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.XmlTableDetail.after:

END PROCEDURE.
**/

/*
Procedure: GetComment
Description:
Parameters:
input icDomain
    ()
input icRef
    ()
input icType
    ()
input icLang
    ()
input iiIndx
    ()
input iiSeq
    ()
output opComment
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetComment.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetComment.after:

END PROCEDURE.
**/

/*
Procedure: GetExchangeRate
Description:
GetExchangeRate: this method will provide you the correct exchange-rate based upon the input parameters you provide.
Parameters:
input igCompanyID
    (CompanyID: the company wherefor you want to retrieve the exchange-rate - when empty then the current company is used)
input igFromCurrencyID
    (FromCurrencyID: when this is not specified and the associated Code-parameter is not filled either, then an error is raised)
input icFromCurrencyCode
    (FromCurrencyCode: this is only used and required in case the associated ID-parameter is not filled)
input igToCurrencyID
    (ToCurrency ID: when this is not specified and the associated Code-parameter is not filled either, then the local-/base-currency is used as the ToCurrency)
input icToCurrencyCode
    (ToCurrencyCode: this is only used in case the associated ID-parameter is not filled)
input igExchangeRateTypeID
    (ExchangeRateType ID: when this is not specified and the associated Code-parameter is not filled either, then the rate-type will be set to Accounting)
input icExchangeRateTypeCode
    (ExchangeRateType Code: this is only used in case the associated ID-parameter is not filled)
input itValidityDate
    (ValidityDate: Date you want to know the exchange-rate for. If nothing is passed then the sytem-date is used as validaty-date)
output odExchangeRate
    (Exchange Rate (always Multiply) of the retrieved rate.

Sample: 
When you have 120 EUR and you want to know how many HRK this is then you call this method like this :
 -  From-curr:  EUR 
 - To-curr:  KRK
Then odExchangeRate will be 8 as 1 EUR = 8 HRK (and odExchangeScale will be 1).

So the value in HRK of 120 EUR will be: 
120 * 8 * 1
(AmountInFromCurr) * odExchangeRate * odExchangeScale)
output odExchangeScaleFactor
    (Exchange Rate Scale Factor of the retrieved rate)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetExchangeRate.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetExchangeRate.after:

END PROCEDURE.
**/

/*
Procedure: AddAdditionalInfoInCTLOG
Description:
This procedure is just meant to log extra information in ctlog to allow a better troubleshooting.
Parameters:
input icTrace
    ()
input icParam1
    ()
input icParam2
    ()
input icParam3
    ()
input icParam4
    ()
input icParam5
    ()
input icParam6
    ()
input icParam7
    ()
input icParam8
    ()
input icParam9
    ()
*/
/**
PROCEDURE BCreditor.AddAdditionalInfoInCTLOG.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.AddAdditionalInfoInCTLOG.after:

END PROCEDURE.
**/

/*
Procedure: AdditionalDocumentation
Description:
This procedure only cotains comments which are important for the class.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.AdditionalDocumentation.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.AdditionalDocumentation.after:

END PROCEDURE.
**/

/*
Procedure: ApiActivitiesAreAllowed
Description:
check if a user has security rights for a list of activities
Parameters:
input icUserLogin
    ()
input icCompanyCode
    ()
input icActivityCodes
    (comma separated list)
output ocAllowed
    (comma separated list of true or false according to the input activity codes)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiActivitiesAreAllowed.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiActivitiesAreAllowed.after:

END PROCEDURE.
**/

/*
Procedure: apiActivityIsAllowed
Description:
check if user has security rights for an activity
Parameters:
input icUsrLogin
    (login name)
input icCompanyCode
    (Entity Code)
input icActivityCode
    (Activity Code)
output olIsAllowed
    (has access)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.apiActivityIsAllowed.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.apiActivityIsAllowed.after:

END PROCEDURE.
**/

/*
Procedure: ApiGetAlternateKeyValues
Description:
This procedure can be used to convert filtering conditions (on browses or reports) on primary key fields into filtering conditions on alternate key fields, which are more readable. This procedure will for example convert a language ID (which is a meaningless number) into a language code. Conversion rules are generated based on the definition of related key business fields in the business class.
Parameters:
input dataset tFilter
    (input dataset with filter conditions)
output dataset tBusinessFieldValues
    (output dataset with converted displayable filter conditions)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiGetAlternateKeyValues.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiGetAlternateKeyValues.after:

END PROCEDURE.
**/

/*
Procedure: ApiQueryFilterPrepare
Description:
This method contains generic code for parsing the input filter criteria for API queries in table tFilter.
Parameters:
input icTables
    (tables in the query)
input-output dataset tFilter
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ApiQueryFilterPrepare.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ApiQueryFilterPrepare.after:

END PROCEDURE.
**/

/*
Procedure: BusinessClassActions
Description:
Provide all necessary functions to start and stop instances of a business class, both for stateless and for state-reset environments.
Parameters:
input icClassShortname
    (Shortname of the business class)
input icAction
    (Possible actions:
Start                        Close
Open                       Stop
Start+Open             Close+Stop
                               Store)
input ilSubtransaction
    (Start the new business instance as part of current transaction yes/no.)
input-output biClassOpenCount
    (use vi{&CLASS}OC)
input-output bhClassInstanceHandle
    (use vh{&CLASS}Inst)
input-output biClassInstanceId
    (use vi{&CLASS}Id)
input icDraftReference
    (A description for the stored instance)
input icUserDefinedContext
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.BusinessClassActions.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.BusinessClassActions.after:

END PROCEDURE.
**/

/*
Procedure: ClearMessages
Description:
Clear the message list (tFcMessages).
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.ClearMessages.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ClearMessages.after:

END PROCEDURE.
**/

/*
Procedure: CustomFields
Description:
Returns the name of all active custom business fields in the class dataset.
Parameters:
input icTableName
    (Database table name)
output ocFieldNames
    (comma seperated list of field names)
output ocFieldLabels
    (chr(2) seperated list of user-defined labels for custom business fields, translated to current-language)
output ocFormats
    ()
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.CustomFields.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.CustomFields.after:

END PROCEDURE.
**/

/*
Procedure: DefineCustomRelations
Description:
This method is foreseen in the abstract component, and is available on all business components and should be used to define information about relations to custom tables in the component.  This method is always empty in case of a non-customized component.  The method should be implemented using non-intrusive customization in order to get the relations known to the UI side.
Typically, this method contains code as follows:

create tCustomRelation.
assign tCustomRelation.tcParentTable = "tCurrency"
       tCustomRelation.tcChildTable = "tCustomTable1"
       tCustomRelation.tcChildTableDescription = "Variantion"
       tCustomRelation.tlIsOneToOne = false.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.DefineCustomRelations.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DefineCustomRelations.after:

END PROCEDURE.
**/

/*
Procedure: DefineState
Description:
Allows to add tables to the state dataset
(ihStateDataset:add-buffer(...))
Parameters:
input ihStateDataset
    ()
*/
/**
PROCEDURE BCreditor.DefineState.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DefineState.after:

END PROCEDURE.
**/

/*
Procedure: DumpInstanceData
Description:
dump all current instance data into an XML file
Parameters:
input icXMLFileName
    (full path file name to write the instance data to
(when blanc, no file will be created))
input icXSDFileName
    (full path file name to write the XML schema of the instance data to
(when blanc, no file will be created))
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.DumpInstanceData.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DumpInstanceData.after:

END PROCEDURE.
**/

/*
Procedure: ExitInstance
Description:
This method can be extended with code to execute when an instance of a business class is stopped.

Standard functionality in this method is
- Clean up instance data in the fcInstance table.
- Create or update a draft instance if applicable.
Parameters:
input icDraftReference
    (Description for the draft instance.
This parameter will have a value when creating a draft instance.)
input icDraftFormName
    (This parameter will have a value when creating a draft instance.)
input ilDraftIsShared
    (This parameter will have a value when creating a draft instance.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ExitInstance.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ExitInstance.after:

END PROCEDURE.
**/

/*
Procedure: ExitProgram
Description:
This method can be extended with code to execute when a business component is stopped.
Parameters:
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.ExitProgram.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ExitProgram.after:

END PROCEDURE.
**/

/*
Procedure: GetBusinessFields
Description:
Returns a full description of all business fields of a business class, browse or report.
Parameters:
input icReference
    (- <classname> for receiving business field information of a business class
- <classname>.<methodname> for receiving business field information of a browse or report)
output dataset tBusinessFields
    ()
output dataset tCustomRelation
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetBusinessFields.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetBusinessFields.after:

END PROCEDURE.
**/

/*
Procedure: GetCustomFieldValues
Description:
fill in a column of a temp-table with custom fields from a business object main table
Parameters:
input ihResultSetBuffer
    ((buffer) handle to the temp-table that must be updated)
input icClass
    (shortname of the business class from which custom fields must be read)
input icTable
    (database table name from which custom fields must be read)
input icKeyColumn
    (name of the column in the result set temp-table that contains the value of primary key of the objects for which custom fields must be read)
input icCustomFieldColumn
    (name of the column in the result set temp-table where custom field values will be stored)
input icCustomBusinessField
    (The can be left blank.
You can specify here the name of the custom busininess fields if you want the value of just 1 of them.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetCustomFieldValues.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetCustomFieldValues.after:

END PROCEDURE.
**/

/*
Procedure: GetDomainFormat
Description:
This method allows to overrule the standard display format of a domain
Parameters:
input icDomainName
    ()
output ocDisplayFormat
    (display format, using the progress syntax)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetDomainFormat.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetDomainFormat.after:

END PROCEDURE.
**/

/*
Procedure: GetKeyFields
Description:
Returns the name of all key fields of a table in the class dataset.

primary key = all fields of the primary index of the table
alternate key = all fields of an index that is an 'alternate key'
(If a table has exactly one unique index other than the primary index, and all fields in that index are business fields, this index automatically becomes the alternate key. Otherwise an index must be marked as alternate key manually.)
object ID = one field of the table that is an 'identity' field
object status = one or more fields of the table that is a 'status' field
Parameters:
input-output bcTableName
    (Database table name.
When left blanc, the name of the main table of the class dataset will be returned.)
output ocPrimaryKey
    (comma seperated list of database field names (excluding table name))
output ocAlternateKey
    (comma seperated list of database field names (excluding table name)
these fields MUST be defined as business field)
output ocObjectID
    (database field name (excluding table name) of the identity field)
output ocObjectStatus
    (database field name (excluding table name) of the status field)
output ocDependency
    (Indicate if the table is dependent from company or a shared set.
If so, company or shared set code must be included in the alternate key.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetKeyFields.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetKeyFields.after:

END PROCEDURE.
**/

/*
Procedure: GetLocalisationCode
Description:
Returns current active localisation code.
Parameters:
output ocLocalisationCode
    ()
*/
/**
PROCEDURE BCreditor.GetLocalisationCode.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetLocalisationCode.after:

END PROCEDURE.
**/

/*
Procedure: GetPublicData
Description:
Procedure for reading the value of public data items, except temp-tables and datasets.
Parameters:
input icDataList
    (Comma seperated list of public data item names to set (full name, including prefix).
Data items with extent and temp-tables are not supported.)
output ocValues
    (chr(3) seperated list of the values.
Format of the values:
decimal = always uses decimal point
date = YYYYMMDD
logical = true / false)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.GetPublicData.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublicData.after:

END PROCEDURE.
**/

/*
Procedure: InitInstance
Description:
This method can be extended with code to execute when an instance of a business class is started.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.InitInstance.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.InitInstance.after:

END PROCEDURE.
**/

/*
Procedure: LoadSystemSettings
Description:
Load system settings (see class BSetting) and store them in variables available to all business classes.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.LoadSystemSettings.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.LoadSystemSettings.after:

END PROCEDURE.
**/

/*
Procedure: LoadUIstate
Description:
load UI state
Parameters:
output omState
    (State data)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.LoadUIstate.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.LoadUIstate.after:

END PROCEDURE.
**/

/*
Procedure: MainBlock
Description:
This method can be extended with code to execute when a business component is started.
Use it to initialise data items that are not part of the business component state.
(Data items that are part of the business component state should be initialised in InitInstance.)
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.MainBlock.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.MainBlock.after:

END PROCEDURE.
**/

/*
Procedure: ReadSessionValues
Description:
Read some comonly used values from session like current user login or current company ID and store these values in variables available to all business classes.
Parameters:
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.ReadSessionValues.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.ReadSessionValues.after:

END PROCEDURE.
**/

/*
Procedure: SaveUIstate
Description:
save UI state
Parameters:
input imState
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.SaveUIstate.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SaveUIstate.after:

END PROCEDURE.
**/

/*
Procedure: SetMessage
Description:
Create a message to send back to the client (either a UI or another application)
Parameters:
input icMessage
    (The actual message, can contain $1, $2, ... for values that are situation-dependent.)
input icArguments
    (chr(2) seperated list of values to replace $1, $2, ... in the message with. These values should not be translatable.)
input icFieldName
    (Optional name of a business field, to link the message to that field.)
input icFieldValue
    (Optional value of the business field, converted to string type.)
input icType
    (Type of message:
E = user error (incorrect input, this type of error is linked to a business field)
D = database error (other errors)
S = system error (or programming error)
W = warning, results in return status +1 (the transaction can still proceed))
input iiSeverity
    (Error severity level (used to sort the messages on in the error viewer):
1 = critical
2 = high
3 = normal
4 = low)
input icRowid
    (Optional rowid to link the message to a single record in the class temp-table (mentioned in parameter icFieldName).
Refers to the field tc_Rowid.)
input icFcMsgNumber
    (A unique number per CB project.
DO NOT CHANGE THIS PARAMETER)
input icFcExplanation
    (Long description, fully explaining what exactly caused the error or warning, and what has to be done to solve the error/warning involved.)
input icFcIdentification
    (If the error is linked to a specific business object, this field should fully identify this object.
The content of this field is considered to be untranslatable.)
input icFcContext
    (Change the description of the icContext parameter of the SetMessage method.

Here, the developer can pass extra context information to the end-user that can help him to understand why things went wrong. 

This field contains context information, like booleans, data items, result of buffer-compare. 
We advise to use the syntax "<Field>=<Value>chr(2)<Field>=<Value>...." as this is recognized by the error viewer. 
The content of this field is considered to be untranslatable.)
output oiReturnStatus
    ()
*/
/**
PROCEDURE BCreditor.SetMessage.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetMessage.after:

END PROCEDURE.
**/

/*
Procedure: SetPublicData
Description:
Procedure for updating the value of public data items, except temp-tables and datasets.
Parameters:
input icDataList
    (Comma seperated list of public data item names to set (full name, including prefix).
Data items with extent and temp-tables are not supported.)
input icValueList
    (chr(3) seperated list of the values to set.
Format of the values:
decimal = use decimal point, replace comma with a point
date = YYYYMMDD
logical = true / false)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.SetPublicData.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublicData.after:

END PROCEDURE.
**/

/*
Procedure: StartCacher
Description:
Start the cacher technical component, if not yet running.
The component will be run only once and will be kept into memory until the server shuts down (stateless) or the user disconnects (state-reset).
Parameters:
output ohCacher
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.StartCacher.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.StartCacher.after:

END PROCEDURE.
**/

/*
Procedure: StartPersistence
Description:
Start the persistence component, if not yet running.
The component will be run only once and will be kept into memory until the server shuts down (stateless) or the user disconnects (state-reset).
Parameters:
output ohPersistence
    (Handle to the correct persistence component.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.StartPersistence.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.StartPersistence.after:

END PROCEDURE.
**/

/*
Procedure: StoreState
Description:
Store current instance as a draft instance in the application database (fcDraftInstance table)
Parameters:
input icDescription
    (Description for the draft instance.)
input icUIClass
    (Shortname of the user interface class used to open the draft instance with.)
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.StoreState.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.StoreState.after:

END PROCEDURE.
**/

/*
Procedure: UICustomization
Description:
Parameters:
input icControlName
    ()
input icEventName
    ()
input dataset tUIInput
    ()
output dataset tUIOutput
    ()
output oiReturnStatus
    (Return status of the method.)
*/
/**
PROCEDURE BCreditor.UICustomization.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.UICustomization.after:

END PROCEDURE.
**/

/*
Procedure: GetPublicTables
Description:
read class tables
Parameters:
output dataset BCreditorO
    (class tables)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.GetPublicTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.GetPublicTables.after:

END PROCEDURE.
**/

/*
Procedure: DataNewGetPublicTables
Description:
combine DataNew and GetPublicTables
Parameters:
output dataset BCreditorO
output oiReturnStatus
*/
/**
PROCEDURE BCreditor.DataNewGetPublicTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DataNewGetPublicTables.after:

END PROCEDURE.
**/

/*
Procedure: DataLoadGetPublicTables
Description:
combine DataLoad and GetPublicTables
Parameters:
input icRowids
input icPkeys
input icObjectIds
input icFreeform
input ilKeepPrevious
output dataset BCreditorO
output oiReturnStatus
*/
/**
PROCEDURE BCreditor.DataLoadGetPublicTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.DataLoadGetPublicTables.after:

END PROCEDURE.
**/

/*
Procedure: SetPublicTables
Description:
write class tables
Parameters:
input il_Validate
    (validate data in class tables and reject if invalid
     when il_Validate = false, data can only be saved as a draft)
input dataset BCreditorS
    (class tables)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublicTables.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublicTables.after:

END PROCEDURE.
**/

/*
Procedure: SetPublicTablesDataSave
Description:
combine SetPublicTables and DataSave
Parameters:
input dataset BCreditorS
    (class tables)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.SetPublicTablesDataSave.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.SetPublicTablesDataSave.after:

END PROCEDURE.
**/

/*
Procedure: CreateCreditor
Description:
add a record in a class table
Parameters:
input ic_ParentRowid
    (value of tc_Rowid field of parent row)
output dataset BCreditorS
    (class tables, containing only the newly created row)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.CreateCreditor.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.CreateCreditor.after:

END PROCEDURE.
**/

/*
Procedure: CreateCreditorSafDefault
Description:
add a record in a class table
Parameters:
input ic_ParentRowid
    (value of tc_Rowid field of parent row)
output dataset BCreditorS
    (class tables, containing only the newly created row)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.CreateCreditorSafDefault.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.CreateCreditorSafDefault.after:

END PROCEDURE.
**/

/*
Procedure: CreateCreditorVat
Description:
add a record in a class table
Parameters:
input ic_ParentRowid
    (value of tc_Rowid field of parent row)
output dataset BCreditorS
    (class tables, containing only the newly created row)
output oiReturnStatus
    (error number)
*/
/**
PROCEDURE BCreditor.CreateCreditorVat.before:

END PROCEDURE.
**/
/**
PROCEDURE BCreditor.CreateCreditorVat.after:

END PROCEDURE.
**/

